home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6200 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.6 KB  |  35 lines

  1. Newsgroups: comp.lang.c++
  2. Path: server.blaze.net.au!csource!not-for-mail
  3. From: David.Powell@f309.n632.z3.fidonet.org (David Powell)
  4. Subject: Modern "Effecient" Compilers
  5. Sender: news@blaze.net.au (news)
  6. Organization: FidoNet: Melbourne PC User Group BBS 
  7. Message-ID: <662_9602110059@csource.blaze.net.au>
  8. X-Nntp-Posting-Host: csource.blaze.net.au
  9. Date: Fri, 9 Feb 1996 19:17:12 GMT
  10.  
  11. I would just like to mention something I noticed while compiling a "zero
  12. length" (ie consisting only of the line main(){} ) cpp file in BC++ 4.52. 
  13. I ensured that all RTTI, exceptions etc were off, and used the
  14. optmize(size) style for my executable and code nodes of my project.  Yet
  15. despite this, and only linking the run-time libraries, my small memory
  16. model application took up 28kb.  Changing to tiny reduced the executable
  17. size to 6kb.  By not linking in the run-time libraries I managed to produce
  18. a 500 byte executable, although it crashed of course.  My question is, why
  19. does 28k of rubbish get linked into my executable when I am making no
  20. external references. (I have all debugging off of course).  I thought that
  21. only code which resolved external references is linked in.  Does anybody no
  22. why this problem occurs, or ways of getting around it without rewriting
  23. lots of code, I would be most grateful if u would post a reply.  It is
  24. quite embarrassing when friends using only the "inferior" Turbo Pascal
  25. 6.0/7.0 compiler can produce 1k files without tweaking anything.  Are the
  26. compiler writers of today too willing to sacrifice performance for good
  27. engineering principals?
  28.  
  29. cya, dave
  30.  
  31.  
  32. --
  33. David.Powell@f309.n632.z3.fidonet.org, David Powell 3:632/309 (FidoNet)
  34.  
  35.